<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "car".
 *
 * @property integer $id
 * @property integer $user_id
 * @property string $brand
 * @property string $symbol
 * @property string $type
 * @property string $car_number
 * @property string $engine_number
 * @property integer $door
 * @property integer $seat
 * @property integer $mileage
 * @property integer $oil_percent
 * @property integer $engine
 * @property integer $gearbox
 * @property integer $light
 * @property string $frame
 * @property integer $city_id
 * @property integer $count
 */
class Car extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'car';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id', 'door', 'seat', 'mileage', 'oil_percent', 'engine', 'gearbox', 'light', 'city_id', 'count'], 'integer'],
            [['brand'], 'string', 'max' => 160],
            [['symbol'], 'string', 'max' => 255],
            [['type', 'car_number'], 'string', 'max' => 100],
            [['engine_number', 'frame'], 'string', 'max' => 150],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'brand' => 'Brand',
            'symbol' => 'Symbol',
            'type' => 'Type',
            'car_number' => 'Car Number',
            'engine_number' => 'Engine Number',
            'door' => 'Door',
            'seat' => 'Seat',
            'mileage' => 'Mileage',
            'oil_percent' => 'Oil Percent',
            'engine' => 'Engine',
            'gearbox' => 'Gearbox',
            'light' => 'Light',
            'frame' => 'Frame',
            'city_id' => 'City ID',
            'count' => 'Count',
        ];
    }
}
